﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Detail.aspx.vb" Inherits="Prototype_Assignments_2.Detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="ID" DataSourceID="DetailMercedesDb" 
            ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                    <ControlStyle Height="175px" Width="200px" />
                </asp:ImageField>
                <asp:BoundField DataField="ModelName" HeaderText="Model Name" 
                    SortExpression="ModelName" />
                <asp:BoundField DataField="ModelYear" HeaderText="Model Year" 
                    SortExpression="ModelYear" />
                <asp:BoundField DataField="CC" HeaderText="CC" SortExpression="CC" />
                <asp:BoundField DataField="Condition" HeaderText="Condition" 
                    SortExpression="Condition" />
                <asp:BoundField DataField="Colour" HeaderText="Colour" 
                    SortExpression="Colour" />
                <asp:BoundField DataField="Registration" HeaderText="Registration" 
                    SortExpression="Registration" />
                <asp:BoundField DataField="Price" HeaderText="Price £" SortExpression="Price" />
                <asp:BoundField DataField="ContactNumber" HeaderText="Contact Number" 
                    SortExpression="ContactNumber" />
                <asp:HyperLinkField DataNavigateUrlFields="PostCode" 
                    DataNavigateUrlFormatString="http://maps.google.co.uk/?q={0}" 
                    DataTextField="PostCode" HeaderText="Post Code" />
                <asp:HyperLinkField DataNavigateUrlFields="InfoURL" 
                    DataNavigateUrlFormatString="{0}" DataTextField="ModelName" HeaderText="Info" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:SqlDataSource ID="DetailMercedesDb" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MercedesConn %>" 
            ProviderName="<%$ ConnectionStrings:MercedesConn.ProviderName %>" 
            SelectCommand="SELECT * FROM [Mercedes] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="" Name="ID" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
